package filter;

import javax.servlet.*;
import java.io.IOException;

/**
 * 02-Filter入门案例
 */
public class Demo01Filter implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("Demo01Filter 过滤");
        chain.doFilter(request, response);//相当于执行Demo01Servlet
        System.out.println("Demo01Filter 放行");

    }
}
